<?php
include_once("../dbdriver/homepageRHandle.php");
include_once("../dbdriver/homepageWHandle.php");
class homepageLogic
{
    public function get_homepage()
    {
        $handle = new homepageRHandle();
        $orderby="order by id desc";
        return $handle->get_all_data($orderby,"");
    }
    public function insert_data($array)
    {
        $newhomepage = $this->get_homepage();
        
        $handle = new homepageWHandle();
        $handle->update_homepage($array,$newhomepage[0]['id']);
    }
}
?>